#include <iostream>
using namespace std;

int main() {
    int n;
    cin >> n;
    double e;

    for (int i = 0; i <= n; i++)
    {
        double temp = 0, jie = 1;
        if (i == 0)
        {
            temp = 1;
        }
        else
        {
            for (int j = i; j > 0; j--)
            {
                jie *= j;
            }
            temp = 1 / jie;
        }
        e += temp;
    }
    printf("%.10f", e);
    
    return 0;
}